import request from '@/utils/request'
import $qs from 'qs'
export function loginByUsername(username, password, keeplogin, token) {
  const data = {
    username, // username
    password,
    keeplogin,
    __token__: token
  }
  return request({
    url: '/sysLogin',
    method: 'post',
    data: $qs.stringify(data)
  })
}

export function sysLogin(params) {
  return request({
    url: '/sysLogin',
    method: 'post',
    data: $qs.stringify(params)
  })
}

export function sysToken() {
  return request({
    url: '/sysToken',
    method: 'get',
    params: {}
  })
}

export function logout() {
  return request({
    url: '/logout',
    method: 'post'
  })
}

export function logoutWeliam() {
  return request({
    url: '/logoutWeliam',
    method: 'post'
  })
}

export function getUserInfo(token) {
  return request({
    url: '/user/info',
    method: 'get',
    params: { token }
  })
}

export function getPoweredByInfo(params) {
  return request({
    url: '/getPoweredByInfo',
    method: 'post',
    data: $qs.stringify(params)
  })
}

export function storeAccountList(params) {
  return request({
    url: '/storeAccountList',
    method: 'post',
    data: $qs.stringify(params)
  })
}

export function logAccount(params) {
  return request({
    url: '/logAccount',
    method: 'post',
    data: $qs.stringify(params)
  })
}
export function kkk(params) {
  return request({
    url: '/kkk',
    method: 'post',
    data: $qs.stringify(params)
  })
}

export function outAccount(params) {
  return request({
    url: '/outAccount',
    method: 'post',
    data: $qs.stringify(params)
  })
}
export function adminLogoInfo(params) {
  return request({
    url: '/adminLogoInfo',
    method: 'post',
    data: $qs.stringify(params)
  })
}
export function loginQrcode(params) {
  return request({
    url: '/loginQrcode',
    method: 'post',
    data: $qs.stringify(params)
  })
}
export function loginQrcodeResult(params) {
  return request({
    url: '/loginQrcodeResult',
    method: 'post',
    data: $qs.stringify(params)
  })
}

